.a {
    grid-template-areas:
        "head head"
        "nav  main"
        "nav  foot"
        "another";
}

.b {
    grid-area: head;
}

.c {
    grid-area: main;
}

.d {
    grid-area: nav;
}

.e {
    grid-area: foot;
}

.f {
    grid-area: foot;
}

@media (max-width: 1000px) {
    .a {
        grid-template-areas: "head main";
    }

    .b {
        grid-area: head;
    }

    .c {
        grid-area: main;
    }

    .d {
        grid-area: main;
    }
}
